/*
 * Powered By XY
 * Since 2020
 */

package com.xy.biz.base.dao;

import java.util.Collection;
import java.util.List;

import com.xy.biz.base.domain.po.AttachmentPO;
import com.xy.biz.base.domain.query.AttachmentQuery;

/**
 *
 *
 * @author wwj
 * @date 2021-4-6
 */
public interface AttachmentDao {

	/**
	 * 保存
	 *
	 * @param attachmentPO
	 */
	int saveAttachment(AttachmentPO attachmentPO);

	/**
	 * 保存多个
	 *
	 * @param collection
	 */
	int saveAllAttachment(Collection<AttachmentPO> collection);

	/**
	 * 更新
	 *
	 * @param attachmentPO
	 */
	int updateAttachment(AttachmentPO attachmentPO);

	/**
	 * 删除
	 *
	 * @param attachmentId
	 */
	int deleteAttachment(Long attachmentId);

	/**
	 * 查找一个
	 *
	 * @param attachmentId
	 * @return
	 */
	AttachmentPO getAttachment(Long attachmentId);

	/**
	 * 查找多条
	 *
	 * @param collection
	 * @return
	 */
	List<AttachmentPO> listAttachmentById(Collection<Long> collection);

	/**
	 * 条件查找多条
	 *
	 * @param query 查找条件
	 * @return
	 */
	List<AttachmentPO> listAttachment(AttachmentQuery query);

	/**
	 * 条件统计个数
	 *
	 * @param query 查找条件
	 * @return
	 */
	int countAttachment(AttachmentQuery query);

}
